From 5622530d07bdb28c5ba2de8ef43bd2af10b9e1a5 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Wed, 2 Feb 2011 15:44:42 +0000 Subject: [PATCH] Follow-up r77640: Check whether there are errors before asking Status to transform them into wikitext. --- includes/HTMLForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 8e3301d1f3..2472bc2d60 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -509,7 +509,11 @@ class HTMLForm { function getErrors( $errors ) { if ( $errors instanceof Status ) { global $wgOut; - $errorstr = $wgOut->parse( $errors->getWikiText() ); + if ( $errors->isOK() ) { + $errorstr = ''; + } else { + $errorstr = $wgOut->parse( $errors->getWikiText() ); + } } elseif ( is_array( $errors ) ) { $errorstr = $this->formatErrors( $errors ); } else { -- 2.20.1